<?php

	include_once('pays.php');

	$HTML = '<h3 id="creercompte_h">Créer un compte</h3>
			<div id="creercompte_souligne"></div>
			<br />
			<form id="creercompteform" method="post" onsubmit="SubmitRegistration(); return false;">
				<table style="margin-left: 50px;">
					<tr>
						<td><label for="nom">Nom*</label></td>
						<td><input type="text" tabindex="1" name="nom" id="nom" size="30" onkeyup="CheckNom();" onblur="CheckNom();"/><br /></td>
						<td><div id="nom-icone"></div><div id="nom-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="prenome">Prénom*</label></td>
						<td><input type="text" tabindex="1" name="prenom" id="prenom" size="30" onkeyup="CheckPrenom();" onblur="CheckPrenom();"/><br /></td>
						<td><div id="prenom-icone"></div><div id="prenom-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="mail">Adresse Mail*</label></td>
						<td><input type="text" tabindex="1" name="mail" id="mail1" size="30" onkeyup="CheckMail1(); CheckMail2();" onblur="CheckExistingEmail();"/><br /></td>
						<td><div id="mail1-icone"></div><div id="mail1-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="mail2">Confirmer adresse Mail*</label></td>
						<td><input type="text" tabindex="1" name="mail2" id="mail2" size="30" onkeyup="CheckMail2();" onblur="CheckMail2();"/><br /></td>
						<td><div id="mail2-icone"></div><div id="mail2-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><br /></td>
					</tr>
					<tr>
						<td><label for="password">Mot de passe*</label></td>
						<td><input type="password" tabindex="2" name="password" id="password1" onkeyup="CheckPassword1(); CheckPassword2();" onblur="CheckPassword1(); CheckPassword2();" size="30"/><br /></td>
						<td><div id="password1-icone"></div><div id="password1-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="password2">Confirmer mot de passe*</label></td>
						<td><input type="password" tabindex="2" name="password2" id="password2" size="30" onkeyup="CheckPassword2();" onblur="CheckPassword2();"/><br /></td>
						<td><div id="password2-icone"></div><div id="password2-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><br /></td>
					</tr>
					<tr>
						<td><label for="voie1">Adresse*</label></td>
						<td><input type="text" tabindex="2" name="voie1" id="voie1" size="30" onkeyup="CheckVoie();" onblur="CheckVoie();"/><br /></td>
						<td><div id="voie-icone"></div><div id="voie-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="voie2"></label></td>
						<td><input type="text" tabindex="2" name="voie2" id="voie2" size="30" onkeyup="CheckVoie();" onblur="CheckVoie();"/><br /></td>
					</tr>
					<tr>
						<td><label for="codepostal">Code postal*</label></td>
						<td><input type="text" tabindex="2" name="codepostal" id="codepostal" size="30" onkeyup="CheckCodePostal();" onblur="CheckCodePostal();"/><br /></td>
						<td><div id="codepostal-icone"></div><div id="codepostal-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="ville">Ville*</label></td>
						<td><input type="text" tabindex="2" name="ville" id="ville" size="30" onkeyup="CheckVille();" onblur="CheckVille();"/><br /></td>
						<td><div id="ville-icone"></div><div id="ville-txt" class="txterreur"></div></td>
					</tr>
					<tr>
						<td><label for="pays">Pays</label></td>
						<td><select name="pays" id="pays">';
	$countries = GetAllCountries();
	foreach($countries as $country)
		$HTML .= '
								<option value="' . $country['nom'] . '">' . $country['nom'] . '</option>';
	
	$HTML .= '
							</select><br />
						</td>
					</tr>
					<tr>
						<td><br /></td>
					</tr>
					<tr>
						<td><label for="tel">Numéro de téléphone</label></td>
						<td><input type="text" tabindex="2" name="tel" id="tel" size="30"/><br /></td>
					</tr>
					<tr>
						<td><br /><td>
					</tr>
					<tr>
						<td></td>
						<td style="text-align: left;"><input id="submit_creercompte" type="submit" name="send" tabindex="12" value=""></input></td>
					</tr>
				</table>
			</form>
			<br />
			<div id="creercompte_souligne"></div>
			<br />';
		
	echo $HTML;	
	
?>